import java.util.Scanner;

public class FahrenheitTOCelsius {
	static Scanner teclado = new Scanner(System.in);

	public static void main(String[] args) {
		
		int n1 = teclado.nextInt();
		transformar(n1);

	}

	public static void transformar(int f) {
		int n1;
		n1 = ( 5 * (f - 32))/9;
		System.out.println(n1);
	}

}
